home *** CD-ROM | disk | FTP | other *** search
-
- /* convert infix notation to postfix notation */
-
- #include <stdio.h>
-
- main()
- {
- char infix_str[200];
- char postfix_str[200];
- void intopost(const char *infix, char *postfix);
-
- while (1) {
- printf("Enter infix: ");
- if (gets(infix_str) == NULL)
- break;
-
- intopost(infix_str, postfix_str);
- printf(" postfix: %s\n", postfix_str);
- }
-
- return 0;
- }
-
-